#include<bits/stdc++.h>
using namespace  std;
int main()
{
	int x,y,o=0,t=0;
	while(cin>>x>>y){
		if(y==0)break;
		if(t==0){
			cout<<x*y<<" "<<y-1;
			t=1;
		}
		else 
			cout<<" "<<x*y<<" "<<y-1;
		o++;
	}
	if(o==0){
		cout<<"0 0";
	}
	return 0;
}
